Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handles translation keys that have only one word (i.e. no spaces… #596

Merged
merged 3 commits into from
Jun 23, 2022

Conversation

BHSDuncan
Copy link
Collaborator

@BHSDuncan BHSDuncan commented May 11, 2022

@balloonpopper
Copy link
Collaborator

balloonpopper commented May 11, 2022

The text still breaks if it's preceded by a space - do you want to fix that under this PR (preceding spaces are fine when translation keys are not in use)?
i.e.
say player ROOM1_look_wall_item_1:" Borked"

Otherwise it looks fine.

@BHSDuncan BHSDuncan requested a review from balloonpopper May 13, 2022 01:07
@balloonpopper
Copy link
Collaborator

Tried all the combos I could think of. The only ones I had issues with are (and I appreciate these are outside the original scope of the ticket, and we might want to leave the crashing ones crashing as they're actually an error) below.

  • If the speech is all blank with an invalid label, you get talking animation but there's nothing to say. Warnings in log.
say player ROOM:"           "
  • Blank text, valid label works fine
  • Leading spaces work fine
  • Trailing are fine
  • Leading and trailing are fine
  • If there is no text at all it crashes, with OR without a valid label, for both avatar/non-avatar
say player ROOM1_look_wall_item_2:""
say player ROOM1_smells:""
  • Missing label but a colon crashes.
say player  :"tweet"
  • Assigning the text (valid label and text) to an ESClocation crashes as it doesn't have a text colour assigned. The sound plays though. Non avatar mode.
say r1_start ROOM1_look_wall_item_2:"I REALLY don't know what that stuff is."
  • Assigning the text (valid label and text) to an ESClocation in avatar mode has no error message. The sound plays, and the text is displayed, BUT the avatar isn't shown in the text box.
say r1_start ROOM1_look_wall_item_2:"I REALLY don't know what that stuff is." avatar
  • A label without a colon crashes with/without avatar
say player ROOM1_look_wall_item_2"a"

@StraToN StraToN merged commit 653e336 into develop Jun 23, 2022
@StraToN StraToN deleted the issue-264 branch July 11, 2022 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants